package com.xrkj.b2c.service.impl.bus;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xrkj.b2c.dao.bus.BusShopCartMapper;
import com.xrkj.b2c.model.bus.BusShopCart;
import com.xrkj.b2c.service.bus.BusShopCartService;

/**
 * 
 * <B>系统名称：</B><BR>
 * <B>模块名称：</B><BR>
 * <B>中文类名：</B>商品购物车服务类<BR>
 * <B>概要说明：</B><BR>
 * 
 * @author 赵子靖
 * @since 2018年07月15日
 */
@Service
public class BusShopCartServiceImpl implements BusShopCartService {
    @Autowired
    private BusShopCartMapper shopCartDao;

    @Override
    public int deleteShopCart(String id) {
        return shopCartDao.deleteByPrimaryKey(id);
    }

    @Override
    public int insertShopCart(BusShopCart shopCart) {
        return shopCartDao.insertSelective(shopCart);
    }

    @Override
    public int updateShopCart(BusShopCart shopCart) {
        return shopCartDao.updateByPrimaryKeySelective(shopCart);
    }

    @Override
    public BusShopCart selectByPrimaryKey(String id) {
        return shopCartDao.selectByPrimaryKey(id);
    }

    @Override
    public Integer findShopCartTotal(Map<String, Object> paramter) {
        return shopCartDao.findShopCartTotal(paramter);
    }

    @Override
    public List<BusShopCart> findShopCartList(Map<String, Object> paramter) {
        return shopCartDao.findShopCartList(paramter);
    }
    
    @Override
    public int deleteByMember(String memberId){
        return shopCartDao.deleteByMember(memberId);
    }

}
